package org.dbpt.performance;

import java.sql.PreparedStatement;
import java.sql.SQLException;

public class StringGenerator implements ParamGenerator{

	private int length;

	public StringGenerator(int length) {
		super();
		this.length = length;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	public void generate(PreparedStatement preparedStatement, int paramIdx)
			throws SQLException {
		preparedStatement.setString(paramIdx, DataGenerator.generateString(length));
	}

}
